
import { NavBar,Icon  } from 'antd-mobile';
import {withRouter} from 'react-router-dom'
import './NavHeader.scss'
import React, {Component} from 'react';

class NavHeader extends Component {
    render() {
        const {className,rightContent} = this.props
        return (

                <NavBar className={['navheader-bar',className ? className : ''].join(' ')}
                        mode="light"
                        icon={<Icon type="left" className='tu'/>}
                        onLeftClick={() => {this.props.history.go(-1)}}
                        onRightClick={() =>{console.log('sdfs')}}
                        rightContent={rightContent}
                >{this.props.children}</NavBar>

        );
    }
}

export default withRouter(NavHeader) ;




